--table = require "table"

local network = {
	{name = "grauna", IP = "210.26.30.47"},
	{name = "arraial", IP = "210.26.30.23"},
	{name = "lua", IP = "210.26.23.12"},
	{name = "derain", IP = "210.26.23.20"},
}

table.sort(network, function (a, b) return (a.name < b.name) end) --大于从大到小,小于从小到大,默认从小到大排序.
for key,value in pairs(network) do
	print(key, value.name, value.IP)
end


local test_table = {2, 1, 3}
table.sort(test_table)

for key,value in pairs(test_table) do
	print(key, value)
end
